package poo.sphere.modele;

public class Sphere {
	private double rayon;
	private double surface;
	private double volume;
	private static final double PI= Math.PI;
	
	public Sphere(double rayon)
	{
		this.rayon=rayon;
		this.surface=this.calculSurface();
		this.volume=this.calculVolume();
	}
	
	public double getRayon(){
		return this.rayon;
	}
	
	public double getSurface(){
		return this.surface;
	}
	
	public double getVolume(){
		return this.volume;
	}
	
	public void setRayon(double rayon){
		this.rayon=rayon;
	}
	
	public double calculVolume(){
		double calcul=(4*PI*Math.pow(this.rayon,3))/3;
		return calcul;
	}
	
	public double calculSurface(){
		double calcul=(4*PI*Math.pow(this.rayon,2));
		return calcul;
	}	
}